<!--
 * @Author: 张卓南
 * @Date: 2023-10-19 18:05:35
 * @LastEditTime: 2023-10-19 18:08:58
 * @Description: 
-->
<template>
    <div class="top">
        <van-icon v-if="!isnoShow" size="36" name="arrow-left" @click="goback"/>
            <div class="title">
                <slot></slot>
            </div>
    </div>
</template>

<script setup lang="ts">

import { useRoute, useRouter } from "vue-router";
import { defineProps } from 'vue';
import { any, string } from "vue-types";

const props = defineProps({
    isnoShow: any ,// 定义接受的 prop 类型
});
const router = useRouter();
const goback = () => {
    router.back()
}
</script>

<style lang="less" scoped>
.top {
    height: 60px;
    background: rgb(36, 202, 239);
    display: flex;
    align-items: center;
}
.title {
    display: flex;
    justify-content: center;
    transform: translateX(-12px);
    flex: 1;
}
</style>